package com.kakarote.hrm.controller;

import com.kakarote.core.common.Result;
import com.kakarote.hrm.entity.BO.QueryEmployeeDataBo;
import com.kakarote.hrm.entity.PO.HrmEmployeeDataChangeRecord;
import com.kakarote.hrm.service.IHrmEmployeeDataChangeRecordService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;



/**
 * <p>
 * 员工、部门修改记录 前端控制器
 * </p>
 *
 * @author guomenghao
 * @since 2021-04-14
 */
@RestController
@RequestMapping("/hrmEmployeeDataChangeRecord")
@Api(tags = "员工管理-员工、部门修改记录")
public class HrmEmployeeDataChangeRecordController {


    @Autowired
    private IHrmEmployeeDataChangeRecordService employeeDataChangeRecordService;

    @PostMapping("/addChangeRecord")
    @ApiOperation("添加修改记录")
    public Result addChangeRecord(@RequestBody HrmEmployeeDataChangeRecord employeeDataChangeRecord) {
        employeeDataChangeRecordService.addChangeRecord(employeeDataChangeRecord);
        return Result.ok();
    }

    @PostMapping("/queryPageList")
    @ApiOperation("分页查询修改记录")
    public Result queryPageList(@RequestBody QueryEmployeeDataBo queryEmployeeDataBo) {
        return Result.ok(employeeDataChangeRecordService.queryPageList(queryEmployeeDataBo));
    }

}

